Module ModCMBcolors
    Public CMBcolors(11, 2, 14)
    Public Sub initialize_CMBcolors()
        'SPRING DARKS
        ''SPRING DARK NEUTRALS:(7) Clear Bright Navy,Medium Warm Gray,Chocolate Brown,Medium Golden Brown,Camel,Light Warm Beige
        'CMBcolors(0, 0, 0) = "010002061 146142139 194181169 200040010 207055014 231155104 228210161 010002061 146142139 194181169 200040010 207055014 231155104 228210161 228210161 010002061 146142139 194181169 200040010 207055014 231155104 228210161"
        ''SPRING LIGHTS:(5++)Ivory,Buff,Light Peach,Warm Pastel Pink,Light Blue"
        'CMBcolors(0, 1, 0) = "253253170 251241151 250199117 247178169 169136200 169136200 247178169 253253170 251241151 250199117 247178169 169136200 169136200 247178169 253253170 251241151 250199117 247178169 169136200 169136200 247178169 247178169"
        ''SPRING ACCENTS:(21+)Light Clear Navy,Light True Blue,Medium Blue,Periwinkle Blue,Dark Periwinkle,Blue,Medium Violet,Pastel Yellow-Green,Bright Yellow-Green,Light True Green,Coral Pink,Clear Bright 
        ''Warm Pink,Peach,Clear Salmon,Bright Coral,Light Orange,Orange-Red,Clear Bright,Red,Light Warm Aqua,Cl  ear Gold, Bright Golden Yellow
        'cmbcolors(0, 2, 0) = "055068134 068064254 007002254 149102208 113075161 148064163 189229126 093179000 092230088 249094073 252010028 250174124 251120075 252069005 252133005 245046000 255000000 098206215 003158156 003158156 034188186 248225067"
        ''SUMMER DARK NEUTRALS:(6+)Grayed Navy,Grayed Blue,Charcoal Blue Gray,Light,Blue Gray,Rose Brown,Cocoa
        'cmbcolors(1, 0, 0) = "105087142 098098181 105105139 176176188 191088071 197134073 105087142 098098181 105105139 176176188 191088071 197134073 105087142 098098181 105105139 176176188 191088071 197134073 191088071 197134073 105087142 098098181"
        ''SUMMER LIGHTS: 7)Soft White,Rose Beige,Powder Blue,Light Lemon Yellow,Powder Pink,Light Mauve,Lavender 
        'cmbcolors(1, 1, 0) = "253252244 244218136 183190223 252253137 248202202 228158196 211153211 253252244 244218136 183190223 252253137 248202202 228158196 211153211 211153211 253252244 244218136 183190223 252253137 248202202 228158196 211153211"
        ''SUMMER ACCENTS:(22)Periwinkle Blue,SkY Blue,Medium Blue,Cadet blue,Pastel Aqua,Medium Aqua,Pastel Blue-Green,Medium Blue-Green,Deep Blue-Green,Pastel Pink,Rose Pink,Deep Rose,Blue-Red,Watermelon Red,Burgundy,Mauve,Raspberry,Orchid 
        ''Soft Fuschsia,Medium Violet,Plum  
        'cmbcolors(1, 2, 0) = "088115184 142163216 079113200 126145192 089208207 057186185 047237141 055201144 033178105 249155160 250115143 249019100 240010091 253034050 197004077 207143164 223003076 212098136 201088115 190114182 121055106 193193193"
        ''AUTUMN DARK NEUTRALS:(7) Dark Bown/Charcoal,Coffee Brown,Camel,Olive Green,Grayed Green,Marine Navy,Warm Gray/Pewter
        'cmbcolors(2, 0, 0) = "078059051 189085040 232131076 027084019 147167145 057064089 158156153 078059051 189085040 232131076 027084019 147167145 057064089 158156153 078059051 189085040 232131076 027084019 147167145 057064089 158156153 232131076"
        ''AUTUMN LIGHTS:(5++)Oyster White, Warm Beige,Light Gold/Buff,Light Peach,Light Periwinkle Blue
        'cmbcolors(2, 1, 0) = "243224178 230171067 234220151 250199117 196145249 196145249 250199117 243224178 230171067 234220151 250199117 196145249 196145249 250199117 243224178 230171067 234220151 250199117 196145249 196145249 250199117 243224178"
        ''AUTUMN ACCENTS:(21+) Deep Periwinkle Blue,Purple,Medium Warm Bronze,Forest Green,Turquoise,Teal Blue,Golden Yellow,GoldTone,Mustard,Terra Cotta,Orange/Pumpkin,Orange-Red,Dark Tomato Red,Rust,Mahogany,Deep Peach,Salmon,Salmon Pink
        'cmbcolors(2, 2, 0) = "091019141 201000231 199088070 007076010 201251001 103182159 000156140 019087106 249224049 226197060 201178068 250165043 243208158 251174063 252066070 241004010 241015004 193081075 250086078 246118073 249099088 193081075"
        ''WINTER DARK NEUTRALS:(7)Navy,Black,Charcoal Gray,Medium True Gray,Light True Gray,Black-Brown,Taupe(stone)
        'cmbcolors(3, 0, 0) = "039037060 000000000 074074074 118118118 176176176 075030032 201191132 039037060 000000000 074074074 118118118 176176176 075030032 201191132 039037060 000000000 074074074 201191132 171181181 186176176 075030032 000000000"
        ''WINTER LIGHTS:(8)Pure White,Icy Gray,Icy Blue,Icy Yellow,Icy Pink,Icy Green,Icy Violet,Icy Aqua
        'cmbcolors(3, 1, 0) = "255255255 207207206 194205250 249250194 251195197 203251195 243195251 200250231 255255255 207207206 194205250 249250194 251195197 203251195 243195251 200250231 255255255 207207206 194205250 249250194 251195197 203251195"
        ''WINTER ACCENTS(21+)Royal Blue,True Blue,Bright Periwinkle Blue,Pine Green,Emerald Green,True Green,Light True Green,Bright Burgundy,Blue-Red,True Red,Royal Purple,Fuchsia,Magenta,Deep Hot Pink,Shocking Pink,Chinese Blue,Hot Turquoise
        ''Lemon Yellow,Light Gray,Rose Beige,Teal Blue
        'cmbcolors(3, 2, 0) = "131000199 000000255 144000255 006116000 007155000 009209000 001236124 234003041 253002091 254035060 138000151 213000181 252000101 253092123 255117120 001136193 002188227 154255097 176176176 244214136 019087107 001136193"

        CMBcolors(0, 0, 0) = "194181169 231155104 228210161 253253170 251241151 250199117 247178169 169136200 169136200 247178169 189229126 250174124 098206215 248225067"
        CMBcolors(0, 1, 0) = "146142139 169136200 068064254 092230088 249094073 252010028 251120075 252069005 252133005 034188186 249094073 252010028 251120075 169136200"
        CMBcolors(0, 2, 0) = "010002061 200040010 207055014 055068134 007002254 149102208 113075161 148064163 093179000 003158156 055068134 007002254 149102208 093179000"
        CMBcolors(1, 0, 0) = "176176188 253252244 244218136 183190223 252253137 248202202 228158196 211153211 089208207 047237141 249155160 250115143 193193193 250115143"
        CMBcolors(1, 1, 0) = "197134073 142163216 126145192 057186185 055201144 249019100 240010091 253034050 207143164 212098136 201088115 190114182 212098136 201088115"
        CMBcolors(1, 2, 0) = "105087142 098098181 105105139 191088071 088115184 079113200 033178105 197004077 223003076 121055106 105087142 098098181 105105139 191088071"
        CMBcolors(2, 0, 0) = "232131076 243224178 230171067 234220151 250199117 196145249 196145249 250199117 201251001 249224049 226197060 243208158 251174063 246118073"
        CMBcolors(2, 1, 0) = "232131076 147167145 158156153 250199117 201000231 103182159 201178068 252066070 241004010 246118073 249099088 147167145 158156153 250199117"
        CMBcolors(2, 2, 0) = "078059051 189085040 027084019 057064089 078059051 091019141 199088070 000156140 019087106 193081075 189085040 027084019 057064089 078059051"
        CMBcolors(3, 0, 0) = "176176176 201191132 255255255 207207206 194205250 249250194 251195197 203251195 243195251 200250231 001236124 255117120 154255097 244214136"
        CMBcolors(3, 1, 0) = "118118118 201191132 144000255 009209000 253002091 254035060 252000101 253092123 002188227 001136193 201191132 144000255 009209000 253002091"
        CMBcolors(3, 2, 0) = "039037060 000000000 074074074 075030032 131000199 000000255 006116000 007155000 234003041 138000151 213000181 001136193 019087107 007155000"

        Dim i, j, k As Integer
        For i = 0 To 3
            For j = 0 To 2
                For k = 10 To 140 Step 10
                    CMBcolors(i, j, k / 10) = Mid(CMBcolors(i, j, 0), (k - 10) + 1, 9)
                Next
            Next
        Next
    End Sub
    Function getCMBcolor(ByVal i As Integer, ByVal j As Integer, ByVal k As Integer) As System.Drawing.Color
        Dim red1 As String
        Dim green1 As String
        Dim blue1 As String
        Dim red As Integer = 0
        Dim green As Integer = 0
        Dim blue As Integer = 0

        If CMBcolors(i, j, k) = "" Then
            initialize_CMBcolors()
        End If

        red1 = (Mid(cmbcolors(i, j, k), 1, 3))
        green1 = (Mid(cmbcolors(i, j, k), 4, 3))
        blue1 = (Mid(cmbcolors(i, j, k), 7, 3))

        red = CInt(red1)
        green = CInt(green1)
        blue = CInt(blue1)

        getCMBcolor = System.Drawing.Color.FromArgb(red, green, blue)
    End Function
  

End Module

